#ifndef _AUTO_CALC_FRAMEWORK_H_
#define _AUTO_CALC_FRAMEWORK_H_

#include <string>
#include "Pattern.h"

using namespace std;

class CAutoCalcFramework
{
public:
	CAutoCalcFramework();

	bool Run();
	double CalcPSNR( bool dump_all = false );

private:
	bool FirstRun();
	bool CheckStop();
	bool NextPattern();
	bool ChangeCoffForPattern();
	bool DoInterpolateAll();

	bool Log( string log );

private:
	int m_iTotalRunTimes;
	int m_iRunTimesForCurrentPattern;
	time_t m_timeTotalBegin;
	time_t m_timeCurrentPatternBegin;

	CPattern * m_pCurrentPattern;
	vector<CPattern*>::iterator m_iterCurrentPattern;

};

#endif // _AUTO_CALC_FRAMEWORK_H_